﻿@{
    ViewBag.Title = "LinkManAdd";
}
@section head
{
    <script src="@Url.Content("~/ScriptPlugin/validate/validate.js")"></script>
    <link href="@Url.Content("~/ScriptPlugin/validate/validate.css")" rel="stylesheet" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/form2json.js")"></script>
    <script type="text/javascript">
    function SaveData(index) {
            if (K.Validate())
            {
                var dto = $('#linkManForm').serializeJson();
                K.AjaxJson("@Url.Content("~/Customer/CustomerInfo/LinkManInsert")", dto, function (result) {
                    if (K.ShowOrAlert(result)) {
                        parent.K.layer.callback(index, dto);
                        parent.K.layer.close(index);
                    }
                });
            }
    }

    (function ($) {
        $.fn.serializeJson = function () {
            var serializeObj = {};
            $(this.serializeArray()).each(function () {
                serializeObj[this.name] = this.value;
            });
            return serializeObj;
        };
    })(jQuery);
    </script>
}
<form action="" id="linkManForm" name="linkManForm">
    <div class="content-form">
        <table class="content-table">
            <tr>
                <th><span>联系人名称</span></th>
                <td>
                    <input type="hidden" id="CustomerId" name="CustomerId" value="@ViewBag.CustomerId" />
                    <input type="hidden" id="Id" name="Id"/>
                    <input type="text" data-valid="required" id="Name" name="Name"/>
                </td>
                <th>排序号</th>
                <td>
                    <input type="text" style="ime-mode:Disabled" id="Order" value="0" name="Order" onkeypress="KingsSharp.OnlyNum();" />
                </td>
            </tr>
            <tr>
                <th>部门</th>
                <td>
                    <input type="text" id="Department" name="Department"/>
                </td>
                <th>
                    职务
                </th>
                <td>
                    <input type="text" id="Job" name="Job"/>
                </td>
            </tr>
            <tr>
                <th>手机号码</th>
                <td>
                    <input type="text" id="Phone" name="Phone"/>
                </td>
                <th>
                    座机号码
                </th>
                <td>
                    <input type="text" id="Tel" name="Tel"/>
                </td>
            </tr>
            <tr>
                <th>传真</th>
                <td>
                    <input type="text" id="Fax" name="Fax"/>
                </td>
                <th>
                    电子邮箱
                </th>
                <td>
                    <input type="text" id="Email" name="Email"/>
                </td>
            </tr>
            <tr>
                <th>邮政编码</th>
                <td>
                    <input type="text" id="PostCode" name="PostCode" />
                </td>
                <th>
                  QQ号
                </th>
                <td>
                    <input type="text" id="QQnumber" name="QQnumber"/>
                </td>
            </tr>
            <tr>
                <th>联系地址</th>
                <td colspan="3">
                    <input type="text" id="Address" name="Address" />
                </td>
            </tr>
        </table>
    </div>
</form>
